package errmsg

const (
	SUCCESS = 200
	ERROR = 500

	//code =200 成功
	SUCCESS_SUB =2001

	//code = 1000 火币
	ERROR_SUB_BOURSE = 1001
	ERROR_SUB_REDIS = 1002

	//code = 900 系统
	ERROR_NOT_FILE = 9001
	ERROR_NOT_UNSUB = 9002
	ERROR_WS_TIMEOUT = 9003
	ERROR_WS_ERROR = 9004

)

var codeMsg =map[int] string{
	SUCCESS : "OK",
	SUCCESS_SUB:"取消订阅成功",
	ERROR : "FAIL",
	ERROR_SUB_BOURSE:"订阅交易所有错误",
	ERROR_SUB_REDIS:"订阅模块REDIS异常",
	ERROR_NOT_FILE:"没有找到对应数据",
	ERROR_NOT_UNSUB:"取消订阅失败",
	ERROR_WS_TIMEOUT:"订阅超时",
	ERROR_WS_ERROR:"订阅错误",
}

func GetErrMsg(code int)string  {
	return codeMsg[code]
}